import { createApp } from 'vue'
import Element from 'element-plus'
import 'element-plus/dist/index.css'
import Drawer from '@/components/container/drawer/index.vue'

export function DrawerService(schema) {
  schema.type = 'drawer'
  const el = document.createElement('div')
  document.body.appendChild(el)
  const app = createApp(Drawer, { schema })
  app.use(Element)
  const ins = app.mount(el)
  ins.show()
}
